package com.example.minisqlite;

import java.sql.SQLException;

public class CreateIndexStatement implements Statement {

    private final String indexName;
    private final String tableName;
    private final String columnName;

    public CreateIndexStatement(String indexName, String tableName, String columnName) {
        this.indexName = indexName;
        this.tableName = tableName;
        this.columnName = columnName;
    }

    @Override
    public ResultSet execute(Engine engine) throws SQLException {
        return engine.createIndex(indexName, tableName, columnName);
    }
}
